Fix build with some gcc versions.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 6 Mar 2006 17:05:09 +0000 (18:05 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 6 Mar 2006 17:05:09 +0000 (18:05 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
tools/libxc/xc_ptrace.c
tools/libxc/xc_ptrace.h

index ee072e4c3482c82ccb9f33bdb00e9055009d426e..cbd1c10c289539e4528842130b3964eeb5b7b789 100644 (file)
@@ -1,6 +1,5 @@
 #define XC_PTRACE_PRIVATE
 
-
 #include <sys/ptrace.h>
 #include <sys/wait.h>
 #include <time.h>
@@ -9,6 +8,36 @@
 #include "xg_private.h"
 #include "xc_ptrace.h"
 
+#ifdef DEBUG
+const char const * ptrace_names[] = {
+    "PTRACE_TRACEME",
+    "PTRACE_PEEKTEXT",
+    "PTRACE_PEEKDATA",
+    "PTRACE_PEEKUSER",
+    "PTRACE_POKETEXT",
+    "PTRACE_POKEDATA",
+    "PTRACE_POKEUSER",
+    "PTRACE_CONT",
+    "PTRACE_KILL",
+    "PTRACE_SINGLESTEP",
+    "PTRACE_INVALID",
+    "PTRACE_INVALID",
+    "PTRACE_GETREGS",
+    "PTRACE_SETREGS",
+    "PTRACE_GETFPREGS",
+    "PTRACE_SETFPREGS",
+    "PTRACE_ATTACH",
+    "PTRACE_DETACH",
+    "PTRACE_GETFPXREGS",
+    "PTRACE_SETFPXREGS",
+    "PTRACE_INVALID",
+    "PTRACE_INVALID",
+    "PTRACE_INVALID",
+    "PTRACE_INVALID",
+    "PTRACE_SYSCALL",
+};
+#endif
+
 /* XXX application state */
 static long                     nr_pages = 0;
 static unsigned long           *page_array = NULL;
index 55b05a77e6dba59e7ac7300f528979d8bd53fbe5..d959ecaab8b0e7e5122d550e9a92775c84f3747e 100644 (file)
@@ -10,8 +10,6 @@
 #define PDRSHIFT        22
 #define PSL_T  0x00000100 /* trace enable bit */
 
-extern const char const * ptrace_names[];
-
 struct gdb_regs {
     long ebx; /* 0 */
     long ecx; /* 4 */